<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title>Add Product</title>
        <c:import url="/WEB-INF/formating/link.jsp"/>
    </head>
    <body>
       <c:import url="/WEB-INF/formating/menu.jsp"/>
        <div id="conteiner">
            <c:import url="/WEB-INF/formating/sideMenu.jsp"/>
            <div id="main">
            <h1>
		Add Product
            </h1>
        
                <form:form modelAttribute="product" action="productAdd" method="post">
                    <fieldset>
                        <legend>Add Product</legend>
                        <p>
                            <form:label for="name" path="name">name</form:label><br/>
                            <form:input path="name" /> <form:errors path="name" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="origin" path="origin" cssErrorClass="error">origin</form:label><br/>
                            <form:input path="origin" /> <form:errors path="origin" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="productCategory" path="productCategory" cssErrorClass="error">productCategory</form:label><br/>
                            <form:select path="productCategory" multiple="false">
                                <form:options items="${categoryList}"/>
                            </form:select>
                            <form:errors path="productCategory" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="productGenus" path="productGenus" cssErrorClass="error">productGenus</form:label><br/>
                            <form:select path="productGenus" multiple="false">
                                <form:options items="${genusList}" itemLabel="genus" itemValue="productGenusID"/>
                            </form:select>
                            <form:errors path="productGenus" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="productSpecification" path="productSpecification" cssErrorClass="error">productSpecification</form:label><br/>
                            <form:select path="productSpecification" multiple="false">
                                <form:options items="${specificationList}" itemLabel="specification" itemValue="productSpecificationID"/>
                            </form:select>
                            <form:errors path="productSpecification" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="pieces" path="pieces" cssErrorClass="error">pieces</form:label><br/>
                            <form:select path="pieces">
                                <form:option value="true" label="true"/>
                                <form:option value="false" label="false"/>
                            </form:select>
                            <form:errors path="pieces" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="volume" path="volume" cssErrorClass="error">volume</form:label><br/>
                            <form:select path="volume">
                                <form:option value="true" label="true"/>
                                <form:option value="false" label="false"/>
                            </form:select>
                            <form:errors path="volume" cssClass="error"/>
                        </p>
                        <p>
                            <form:label for="weight" path="weight" cssErrorClass="error">weight</form:label><br/>
                            <form:select path="weight">
                                <form:option value="true" label="true"/>
                                <form:option value="false" label="false"/>
                            </form:select>
                            <form:errors path="weight" cssClass="error"/>
                        </p>
                        <p>
                            <input type="submit" name="Save"/>
                        </p>
                    </fieldset>
                </form:form>
           
                <hr>
                </hr>

            <ul>
                <li><a href="product">Back to Product</a></li>
            </ul>
             </div>
        </div>
            <c:import url="/WEB-INF/formating/foot.jsp"/>
    </body>
</html>